www.gusucode.com > 云网互动影视系统(12套模版和资源联盟) 6.2 > 云网互动影视系统(12套模版和资源联盟) 6.2.4/免费版/Admin/Admin_UsersMsg.asp

    <html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--会员消息管理</title>
<LINK href="css/css.css" type=text/css rel=stylesheet>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<script language="JavaScript" src="YWNT_TMS_Inc/YWNT_TMS_Common.js"></script>
<!--#include file="../Conn.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Page.asp" -->
<%
'===================================================================================================================
'软件名称:云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ:489234,2813712
'程序版权:云网互动科技有限公司
'程序开发:云网互动科技有限公司
'官方网站:http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("UsersMsg")
sub AddSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Msg"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("MsgGroup")=NoSqlHack(Request.Form("MsgGroup"))
		RS("MsgName")=NoSqlHack(Request.Form("MsgName"))
		RS("MsgContent")=NoSqlHack(Request.Form("MsgContent"))
		RS("MsgDate")=Now()
		Rs.Update
		MsgID=RS("ID")
		Rs.Close
		Set Rs = Nothing
		Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select UsersName from YWNT_TMS_Users where UsersGroup="&NoSqlHack(Request.Form("MsgGroup"))
		Rs.open sql,Conn,1,1
		Set RsMsg = server.CreateObject(YWNT_TMS_RS)
		sqlMsg="select * from YWNT_TMS_UsersMsg"
		RsMsg.open sqlMsg,Conn,1,3
		do while not RS.eof
		RsMsg.addnew
		RSMsg("UsersName")=RS("UsersName")
		RSMsg("MsgID")=MsgID
		RsMsg.Update
		RS.movenext     
    	loop
		RsMsg.Close
		set RsMsg=nothing
		RS.close     
		set RS=nothing
		Call AddLog("添加会员消息"&Request.Form("MsgName"),7)
		call Admin_ShowErr("<li>添加会员消息成功</li>","Admin_UsersMsg.asp",1)
end sub
sub Del()
	conn.execute "delete from YWNT_TMS_Msg WHERE ID ="&NoSqlHack(Request("ID"))
	conn.execute "delete from YWNT_TMS_UsersMsg WHERE MsgID ="&NoSqlHack(Request("ID"))
	Call AddLog("删除会员消息",7)
	call Admin_ShowErr("<li>删除会员消息成功!</li>","Admin_UsersMsg.asp",1)
end sub
sub DelLook()
	conn.execute "delete from YWNT_TMS_UsersMsg WHERE UsersLook=1"
	Call AddLog("删除以读会员消息",7)
	call Admin_ShowErr("<li>删除以读会员消息成功!</li>","Admin_UsersMsg.asp",1)
end sub%>
<table class=table cellspacing=1 cellpadding=3 width="98%" 
align=center border=0>
  <tbody>
    <tr>
      <td align="center" class=xingmu>会员消息管理</td>
    </tr>
    <tr>
      <td class="hback"><a href="Admin_UsersMsg.asp">会员消息管理首页</a> | <a href="Admin_UsersMsg.asp?Action=Add">添加新会员消息</a> | <a href="Admin_UsersMsg.asp?Action=DelLook">删除所有已读消息</a></td>
    </tr>
  </tbody>
</table>
<% Action=Trim(request("Action"))
Select Case Action
Case "Add"
	call Add()
Case "AddSave"
	call AddSave()
Case "Del"
	call Del()
Case "DelLook"
    call DelLook()
Case else
	call List()
End Select
sub List()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td align="center" class=xingmu>消息标题</td>
      <td width="15%" align="center" class=xingmu>会员组</td>
      <td width="20%" align="center" class=xingmu>添加时间</td>
	  <td width="10%" align="center" class=xingmu>操作</td>
    </tr>
<%Dim int_RPP
		int_RPP=GetConfig("PageNumber") '设置每页显示数目  
		Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select ID,MsgName,MsgGroup,MsgDate from YWNT_TMS_Msg Order by ID desc"
		Rs.open sql,Conn,1,1
	if Rs.eof then
	   Response.Write"<TR  class=""hback""><TD colspan=""5"" class=""hback"" height=""40"">没有记录。</TD></TR>"
	else
		Rs.PageSize=int_RPP
		cPageNo=NoSqlHack(Request.QueryString("Page"))
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo 
	for i=1 to int_RPP
	 if Rs.eof Then exit For%>
    <tr>
      <td height=32 align="center" class="hback"><%=RS("ID")%></td>
      <td height=32 class="hback"><%=RS("MsgName")%></td>
      <td height=32 align="center" class="hback"><%=UsersGroup(RS("MsgGroup"))%></td>
      <td align="center" class="hback"><%=RS("MsgDate")%></td>
	  <td align="center" class="hback"><A href="Admin_UsersMsg.asp?Action=Del&ID=<%=RS("ID")%>">删除</A></td>
    </tr>
		<%RS.movenext     
    	next 
		end if%>
	<tr align="right">
	<td height=32 colspan="5" class="hback"><% response.Write fPageCount(Rs,cPageNo) %></td>
	</tr>
	<%RS.Close
	Set RS = Nothing%>
  </tbody>
</table>
<%end sub
sub Add()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
 <form name="form" action="Admin_UsersMsg.asp?Action=AddSave" method="post" onSubmit="if (!Msgcheck()) return false;">
  <tbody>
    <tr>
      <td colspan="2" class=xingmu>消息发送</td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">会员组:</td>
      <td height=7 class="hback"><%call UsersGroupselect("MsgGroup",1)%></td>
    </tr>
    <tr>
      <td width="21%" height=32 align="right" class="hback">消息标题:</td>
      <td height=7 class="hback"><input name="MsgName" type="text" id="MsgName" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">消息内容:</td>
      <td height=16 class="hback"><textarea name="MsgContent" cols="40" rows="5" id="MsgContent"></textarea></td>
    </tr>
    <tr>
      <td height=32 colspan="2" align="center" class="hback"><input type="submit" name="Submit" value="发 送"></td>
    </tr>
  </tbody>
  </form>
</table>
<%end sub
call connclose()%>
</BODY></HTML>